﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using TPTecnicas.MessageConnection;
using System.Web.Configuration;

namespace TPTecnicas.GetMailsSvc
{
	// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
	public class GetMailsService : IGetMailsService
	{
		public string GetData(int value)
		{
			return string.Format("You entered: {0}", value);
		}



		public string GetMail()
		{			
			string mailConfiguration = WebConfigurationManager.AppSettings["MailConnection"].ToString();
			string server = mailConfiguration.Substring(mailConfiguration.IndexOf("srv="),mailConfiguration.IndexOf(";"));
			string userAccount = mailConfiguration.Substring(mailConfiguration.IndexOf("uid="),mailConfiguration.IndexOf(";"));
			string password = mailConfiguration.Substring(mailConfiguration.IndexOf("pwd="), mailConfiguration.IndexOf(";"));
			
			
			return "";
		}
	}
}
